package model;

import java.util.TimerTask;

/**
 * @author  megea
 */
public class MessuresTaker extends TimerTask {

    /**
     * @uml.property  name="sensor"
     * @uml.associationEnd  
     */
    protected Sensor sensor;
    /**
     * @uml.property  name="source"
     * @uml.associationEnd  
     */
    protected Source source;

    public MessuresTaker(Sensor sensor, Source source) {
        super();
        this.sensor = sensor;
        this.source = source;
    }

    @Override
    public void run() {
        sensor.setSensedValue(source.getValue());
    }

}
